#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <windows.h>
#include <vadefs.h>

//int main()
//{
//	printf("%d %d %d %d %d %d", 5, 4, 3, 2, 1, 0);
//	return 0;
//}


char GetMax(int num, ...)
{
	va_list arg;
	va_start(arg, num);
	int max = va_arg(arg, int);
	for (int i = 1; i < num; i++)
	{
		int cur = va_arg(arg, int);
		if (cur>max)
		{
			max = cur;

		}
	}
	va_end(arg);

	return max;
}


int main()
{
	char a = 'a';
	char b = 'b';
	char c = 'c';
	char d = 'd';
	char e = 'e';

	char max = GetMax(5, a, b, c, d, e);
	
	printf("max = %c\n", max);

	return 0;
}

